﻿using System.Collections;
using System.Collections.Generic;

namespace Oxage.CNC.Models
{
	public class GCode : IMachineCode
	{
		//MaxFeedRate
		//MaxSpindleSpeed
		//Movement: Relative, Absolute
		//FeedRate
		//Spindle
		//Coordinate
		//I, J, arcRadiusR

		#region Constructor
		public GCode()
		{
			this.blocks = new List<IMachineCodeBlock>();
		}
		#endregion

		#region IMachineCode Members
		private List<IMachineCodeBlock> blocks;

		public List<IMachineCodeBlock> Blocks
		{
			get
			{
				return this.blocks;
			}
		}

		public void Add(IMachineCodeBlock block)
		{
			this.Blocks.Add(block);
		}
		#endregion

		#region IEnumerable<IMachineCodeBlock> Members
		public IEnumerator<IMachineCodeBlock> GetEnumerator()
		{
			return this.blocks.GetEnumerator();
		}
		#endregion

		#region IEnumerable Members
		IEnumerator IEnumerable.GetEnumerator()
		{
			return this.blocks.GetEnumerator();
		}
		#endregion
	}
}
